//
//  HJIMSDK.m
//  KaiChat
//
//  Created by lx on 2023/10/20.
//

#import "HJIM.h"

#import "HJConversationManager.h"
#import "HJChatUserManager.h"
#import "HJChatMessageManager.h"
#import "HJChatManager.h"
#import "HJChatGroupManager.h"


@implementation HJIM

static HJIM *_IM = nil;

+ (HJIM *)shareIM {
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        _IM = [[self alloc] init];
    });
    return _IM;
}

- (instancetype)init {
    if (self = [super init]) {
        [self customManager:NO];
    }
    return self;
}

- (void)customManager:(BOOL)isCustom {
    self.conversationManager = [[HJConversationManager alloc] init];
    self.userManager = [[HJChatUserManager alloc] init];
    self.messageManager = [[HJChatMessageManager alloc] init];
    self.chatManager = [[HJChatManager alloc] init];
    self.groupManager = [[HJChatGroupManager alloc] init];
}


@end
